package spring.library.LibraryProject.model;

import lombok.Data;
import spring.library.LibraryProject.enums.BookStatusEnum;

@Data
public class bookInfo {
    private Integer id;
    private String name;
    private String author;
    private Integer count;
    private Integer price;
    private String publisher;
    private Integer state=1;//1 可借阅  2 不可借阅
    private String stateCN;

    public void setState(Integer state) {
        this.state = state;
        this.stateCN = BookStatusEnum.getMesByCode(state);
    }

}
